package com.cskaoyan.controller.admin;

import com.cskaoyan.bean.vo.BaseRespVo;
import com.cskaoyan.bean.vo.RegionListVo;
import com.cskaoyan.service.RegionListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description:
 * @Author: chaohe@com.cskaoyan
 * @Date: 2021/7/8
 * @Time: 19:59
 */
//行政区域
@RestController
@RequestMapping("admin/region")
public class RegionListController {

    @Autowired
    RegionListService regionListService;
    /**
     * @Author chaohe
     * @description: 商场模块的行政区域
     * @Date 0:47 2021/7/9
     * url:  http://localhost:8083/admin/region/list
     */
    //行政区域
    @GetMapping("/list")
    public BaseRespVo list() {
        List<RegionListVo> regionListVoList = regionListService.list();
        return BaseRespVo.ok(regionListVoList);
    }
}
